﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;
using XcoAppSpaces.Contracts.Messaging;

namespace XcoAppSpaces.Core.CcrWiring.CcrRemote
{
	///// <summary>
	///// Special Ccr task that can send data that has been posted to a port to named remote port instance
	///// (a worker).
	///// </summary>
	//class NamedRemotableTask : RemotableTask
	//{
	//	private readonly string workerIdentifier;
	//	private readonly Guid sessionID;

	//	public NamedRemotableTask(Handler<MessageToSend> messageProcessor, string workerAddress, string commServiceName, string workerIdentifier, Guid sessionID, IPort assignedPort, MessageTransferMode mode)
	//		: base(messageProcessor, workerAddress, commServiceName, Guid.Empty, assignedPort, mode)
	//	{
	//		this.workerIdentifier = workerIdentifier;
	//		this.sessionID = sessionID;
	//	}

	//	public override ITask PartialClone()
	//	{
	//		return new NamedRemotableTask(messageProcessor, RemoteAddress, CommServiceName, workerIdentifier, sessionID, assignedPort, Mode);
	//	}

	//	protected override RemoteMessage CreateMessage(object value)
	//	{
	//		return new WorkerMessage(workerIdentifier, sessionID, value);
	//	}

	//	public override RemotableTask PartialClone(IPort newAssignedPort, MessageTransferMode newMode)
	//	{
	//		return new NamedRemotableTask(messageProcessor, RemoteAddress, CommServiceName, workerIdentifier, sessionID, newAssignedPort, newMode);
	//	}
	//}
}
